package com.baizhi.controller;

import com.baizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Lenovo on 2019/6/19.
 */
@Controller
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/fenye")
    public @ResponseBody Map fenye(int page,int rows,String userName) throws InterruptedException {
        Thread.sleep(2000);//睡三喵钟
        return   userService.fenye(page, rows, userName);
    }


    //查男女比例
    @RequestMapping("/selectSexCount")
    public @ResponseBody List selectSexCount(){
        return userService.selectSexCount();
    }



}
